MCQ Answer

Write a list comprehension for number and its cube for:

l=[1, 2, 3, 4, 5, 6, 7, 8, 9]

Write a list comprehension for number and its cube for:

l=[1, 2, 3, 4, 5, 6, 7, 8, 9]



नंबर और उसके क्यूब के लिए एक लिस्ट लिखें:
Topic : Sequence data types in python

A. [x**3 for x in l]

B. [x^3 for x in l]

C. [x**3 in l]

D. [x^3 in l]




Correct Answer is :

A. [x**3 for x in l]



Explanation
The list comprehension to print a list of cube of the numbers for the given list is: [x**3 for x in l].
CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz